package com.peng.pojo;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;

public class User implements Serializable {
    private int id;
    private String username;
    private String password;
    private String nickName;
    private String email;
    private String phoneNumber;
    private String picture;
    private String sex;
    private Date birthday;
    private Timestamp registrationTime; //注册时间
    private Integer accountId;
    private Integer status; //1 正常 2 冷冻
    private String signature;
    private String realName;
    private String education;
    private String introduce;
    private Integer roleId;
    private Integer levelId;
    private Level level; //等级
    private Role role; //权限
    private Account account;// 账户
    private List<Article> articles; //文章集合
    private List<OpenCourse> openCourses; //公开课
    private List<WelfareCastle> welfareCastles; //福利城堡

    public User() {
    }

    public User(int id, String username, String password, String nickName, String email, String phoneNumber, String picture, String sex, Date birthday, Timestamp registrationTime, Integer accountId, Integer status, String signature, String realName, String education, String introduce, Integer roleId, Integer levelId) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.nickName = nickName;
        this.email = email;
        this.phoneNumber = phoneNumber;
        this.picture = picture;
        this.sex = sex;
        this.birthday = birthday;
        this.registrationTime = registrationTime;
        this.accountId = accountId;
        this.status = status;
        this.signature = signature;
        this.realName = realName;
        this.education = education;
        this.introduce = introduce;
        this.roleId = roleId;
        this.levelId = levelId;
    }

    public List<Article> getArticles() {
        return articles;
    }

    public void setArticles(List<Article> articles) {
        this.articles = articles;
    }

    public List<OpenCourse> getOpenCourses() {
        return openCourses;
    }

    public void setOpenCourses(List<OpenCourse> openCourses) {
        this.openCourses = openCourses;
    }

    public List<WelfareCastle> getWelfareCastles() {
        return welfareCastles;
    }

    public void setWelfareCastles(List<WelfareCastle> welfareCastles) {
        this.welfareCastles = welfareCastles;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickName='" + nickName + '\'' +
                ", email='" + email + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", picture='" + picture + '\'' +
                ", sex='" + sex + '\'' +
                ", birthday=" + birthday +
                ", registrationTime=" + registrationTime +
                ", accountId=" + accountId +
                ", status=" + status +
                ", signature='" + signature + '\'' +
                ", realName='" + realName + '\'' +
                ", education='" + education + '\'' +
                ", introduce='" + introduce + '\'' +
                ", roleId=" + roleId +
                ", levelId=" + levelId +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Timestamp getRegistrationTime() {
        return registrationTime;
    }

    public void setRegistrationTime(Timestamp registrationTime) {
        this.registrationTime = registrationTime;
    }

    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getLevelId() {
        return levelId;
    }

    public void setLevelId(Integer levelId) {
        this.levelId = levelId;
    }

    public Level getLevel() {
        return level;
    }

    public void setLevel(Level level) {
        this.level = level;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }
}
